package com.dt.dubai.mber.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 顾客积分交易表
 */

@Data
@Table(name = "dt_mber_customer_integral")
@EqualsAndHashCode(callSuper = false)
public class MberCustomerIntegralEntity extends BaseEntity {

    //顾客登录记录ID
    @NotNull(message = "customerRecordId参数不能为空")
    Long customerRecordId;

    //交易类型 1-累积,2-消费,3-兑换,4-退积
    Integer tradeType;

    //对方单号
    @Length(min = 0, max = 32, message = "opponent参数最大长度不32")
    String opponent;

    //借积分
    Integer debitAmount;

    //贷积分
    Integer creditAmount;

    //交易信息
    @NotNull(message = "tradeMessage参数不能为空")
    @Length(min = 0, max = 100, message = "tradeMessage参数最大长度不100")
    String tradeMessage;

    //交易状态 1-发起,2-成功,3-失败
    Integer tradeState;


}
